<div class="form">

    <?php $form=$this->beginWidget('CActiveForm', array(
    'id'=>'site-feedback-form',
    'enableAjaxValidation'=>false,
)); ?>

    <p class="note">Fields with <span class="required">*</span> are required.</p>

    <?php echo $form->errorSummary($model); ?>

    <?php if (! $model->IsNewRecord) echo $form->hiddenField($model, "id") ; ?>

    <div class="row">
        <?php echo $form->labelEx($model,'subject'); ?>
        <?php echo $form->textField($model,'subject',array('size'=>60,'maxlength'=>255)); ?>

        <?php echo $form->error($model,'subject'); ?>
    </div>

    <?php if(user()->isGuest):?>
    <div class="row">
        <?php echo $form->labelEx($model,'email'); ?>
        <?php echo $form->textField($model,'email',array('size'=>60,'maxlength'=>255)); ?>
        <?php echo $form->error($model,'email'); ?>
    </div>
    <?php endif;?>

    <div class="row">
        <?php echo $form->labelEx($model,'content'); ?>
        <?php echo $form->textArea($model,'content',array('rows'=>6, 'cols'=>50, 'style'=>'resize: none;')); ?>
        <?php echo $form->error($model,'content'); ?>
    </div>

    <div class="row">
        <?php /*echo $form->labelEx($model,'top_nav_image_path'); */?>
        <?php echo $form->hiddenField($model,'top_nav_image_path',array('size'=>60,'maxlength'=>255)); ?>

        <?php /*echo $form->error($model,'top_nav_image_path'); */?>
    </div>

    <div class="row">
        <?php /*echo $form->labelEx($model,'main_image_path'); */?>
        <?php echo $form->hiddenField($model,'main_image_path',array('size'=>60,'maxlength'=>255)); ?>
        <?php /*echo $form->error($model,'main_image_path'); */?>
    </div>


    <div class="row buttons">
        <?php echo CHtml::submitButton('Send',array('id'=>'submit-feedback')); ?>
    </div>

    <?php $this->endWidget(); ?>

</div><!-- form -->
<?php
$script = "
    $('#submit-feedback').live('click',function(){
        captureAllElements();
        return false;
    });
";
Yii::app()->clientScript->registerScript('script_show_feedback_form',$script);
?>